require.config({
    baseUrl: '/js',
    paths: {
    "jquery": "lib/jquery-1.11.0.min",
    "text": "lib/text",
    "knockout":"lib/knockout-3.4.2.debug",
    "sammy":"lib/sammy-0.7.4",
    "app":"modules/app"
  },
  shim: {
    "jquery":{
      exports:"jquery"
    },
    "sammy": {
      deps:["jquery"]
    }
  }
});
ko.validation.locale('zh-CN');
ko.validation.init({
    registerExtenders: true,
    messagesOnModified: true,
    insertMessages: true,
    parseInputAttributes: false,
    messageTemplate: null
}, true);
var path = window.location.pathname.substr(1);
var strs = path.split('/');
if (strs.length == 1) {
    if (path.lastIndexOf('/') != path.length - 1) {
        path += '/';
    }
    path += 'index';
}   
path='views/'+path;
require(["knockout",path], function(ko,page){  
  var viewmodel = new page();
  ko.applyBindings(viewmodel);
});
 